import axios from 'axios';
import './config';
export const login = function (params) {
    return axios.post('/user/login', params).then(res => {
        return res
    })
}
export const upDatePhoto = (params) => {
    let config = {
        headers: {
            //添加请求头
            "Content-Type": "multipart/form-data",
        },
    };
    return axios.post('/user/update/head_photo', params, config).then(res => res)
}
export const updateName = (params) => {
    return axios.post('/user/update/user_name', params).then(res => res)
}
export const updateSex = (params) => {
    return axios.post('/user/update/sex', params).then(res => res)
}
export const updatePhone = (params) => {
    return axios.post('/user/update/phone', params).then(res => res)
}
export const updateWXAndZFB = (params) => {
    return axios.post('/user/update/pay_type', params).then(res => res)
}